﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bass_Trainer
{
    class RandomScales
    {
        private static int RandomNumber(int min, int max)
        {
            Random random = new Random();
            return random.Next(min, max);
        }

        public static string GeneratePitch()
        {
            int num = RandomNumber(1, 12);

            switch (num)
            {
                case 1:
                    return "A";
                case 2:
                    return "A#";
                case 3:
                    return "B";
                case 4:
                    return "C";
                case 5:
                    return "C#";
                case 6:
                    return "D";
                case 7:
                    return "D#";
                case 8:
                    return "E";
                case 9:
                    return "F";
                case 10:
                    return "F#";
                case 11:
                    return "G";
                case 12:
                    return "G#";
                default:
                    return "Bug";
            }
        }

        public static string GenerateTone()
        {
            int num = RandomNumber(1, 7);

            switch (num)
            {
                case 1:
                    return "Ionian";
                case 2:
                    return "Dorian";
                case 3:
                    return "Phrygian";
                case 4:
                    return "Lydian";
                case 5:
                    return "Mixolydian";
                case 6:
                    return "Aoelian";
                case 7:
                    return "Locrian";
                default:
                    return "Bug";
            }
        }

        public static string GenerateScale()
        {
            string pitch = GeneratePitch();
            string tone = GenerateTone();

            string scale = pitch + " " + tone;
            return scale;
        }
    }
}
